<html>
<head>

    <script src="jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="qunit-1.10.0.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="qunit-1.10.0.css">
    <link rel="stylesheet" type="text/css" href="index.css">

    <script src="script.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
        // format code
        for(var i=0; i<examples.length; ++i){
            var id = 'example-'+i;
            $('#examples').append('<h3>'+examples[i].name+'</h3>');
            $('#examples').append('<pre id="'+id+'"></pre>');
            $('#'+id).text(examples[i].code.toString());
        }
        // run code
        for(var i=0; i<examples.length; ++i){
            test( examples[i].name, examples[i].code);
        }
    });
    </script>

</head>
<body>

    <div id='examples' class='code-fragment'>
    </div>

    <div id="qunit"></div>
    <div id="qunit-fixture"></div>

</body>
</html>
